import axios from "./index"

// 还款详情列表
export const paymentListApi = () =>
    axios({
        method: "POST",
        url: "/loanafter/loanafter_payback/query",
        data: {
            currentPage: 1,
            pageSize: 10,
            data: {
                loan_id: 10001
            }
        }
    })

// 还款录入
export const paymentUpdateApi = () =>
    axios({
        method: "POST",
        url: "/loanafter/loanafter_payback/update",
        data: {
            payback_realpaydate: "2021-12-23",
            payback_discount: 0.0,
            payback_comment: "测试哈",
            user_commit_name: "张丽丽",
            payback_overdate: 0,
            loan_id: "10002",
            payback_timelimit: "1"
        }
    })

// 警告列表
export const warningListApi = (pageInfo) => {
    console.log(pageInfo);
    return axios({
        method: "POST",
        url: "/loanafter/loanafter_warning/query",
        data: {
            ...pageInfo,
            // data: {
            //     // loanafter_status: 1,
            //     // loanafter_warningstage: 1
            // },
        }
    })
}

// 警告添加
export const warningAddApi = (values) => {
    console.log(values);
    return axios({
        method: "POST",
        url: "/loanafter/loanafter_warning/add",
        data: {
            ...values
            // loanafter_loantype: 2,
            // loanafter_warningname: "hhhhh",
            // loanafter_group: 1,
            // loanafter_loanproduct: 1,
            // loanafter_warningstage: 1,
            // loanafter_warningperiod: 1,
            // loanafter_sendwarningtime: "12:00",
            // loanafter_status: 1,
            // user_id: 1,
            // loanafter_beforewarningdate: 3
        }
    })
}

// 警告修改
export const warningUpdateApi = (values) => {
    console.log(values);
    return axios({
        method: "POST",
        url: "/loanafter/loanafter_warning/update",
        data: {
            ...values
        }
    })
}

// 利率列表
export const rateListApi = () =>
    axios({
        method: "POST",
        url: "/loanafter/loanafter_inerestrate_change/query",
        data: {
            currentPage: 1,
            pageSize: 10,
            data: {

            }
        }
    })

// 利率新增
export const rateAddApi = () =>
    axios({
        method: "POST",
        url: "/loanafter/loanafter_inerestrate_change/add",
        data: {

            loan_id: 1,
            changeafter_interestrate: 11.4,
            change_description: "破产贷"

        }
    })

// 结项列表
export const finishListApi = () =>
    axios({
        method: "POST",
        url: "/loanafter/loanafter_end/query",
        data: {
            currentPage: 1,
            pageSize: 10,
            data: {

            }
        }
    })

// 结项修改
export const finishUpdateApi = () =>
    axios({
        method: "POST",
        url: "/loanafter/loanafter_end/update",
        data: {
            loan_id: 10001,
            end_rank: 4,
            end_description: "测试一下",
            end_status: 1
        }
    })

// 检查列表
export const checkListApi = () =>
    axios({
        method: "POST",
        url: "/loanafter/loanafter_checkreport/query",
        data: {
            currentPage: 1,
            pageSize: 10,
            data: {

            }
        }
    })

// 检查新增
export const checkAddApi = () =>
    axios({
        method: "POST",
        url: "/loanafter/loanafter_checkreport/add",
        data: {
            loan_id: 1,
            loanafter_check_type: 1,
            loanafter_check_reason: 1,
            loanafter_check_content: "测试",
            loanafter_group: 1,
            loanafter_suggestion: "测试",
            loanafter_document_id: 1
        }
    })


